<?php if($this->pageCount > 1): ?>
    <div class="pagination">
        <ul class="pagination">
        	<!-- Previous page link -->
        	<?php if (isset($this->previous)): ?>
                <li>
                	<a class="text" href="<?php echo $this->url(array('page' => $this->previous)); ?>"> ← Previous</a>
                </li>
            <?php endif; ?>
            
            <!-- Numbered page links -->
            <?php foreach ($this->pagesInRange as $page): ?>
            	<li>
            		<?php if($page == $this->current): ?>
            			<span class="current"><?php echo $page; ?></span>
            		<?php else: ?>
            			<a href="<?php echo $this->url(array('page' => $page)); ?>"><?php echo $page; ?></a>
            		<?php endif; ?>
            	</li>
            <?php endforeach; ?>
            
            <!-- Next page link -->
            <?php if (isset($this->next)): ?>
                <li>
                	<a class="text" href="<?php echo $this->url(array('page' => $this->next)); ?>">Next →</a>
                </li>
            <?php endif; ?>
        </ul>
    </div>
<?php endif; ?>